package com.hou.houlymall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hou.common.utils.PageUtils;
import com.hou.houlymall.member.entity.MemberEntity;
import com.hou.houlymall.member.exception.PhoneExistException;
import com.hou.houlymall.member.exception.UsernameExistException;
import com.hou.houlymall.member.vo.MemberLoginVo;
import com.hou.houlymall.member.vo.MemberRegistVo;
import com.hou.houlymall.member.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author leifengyang
 * @email leifengyang@gmail.com
 * @date 2019-10-08 09:47:05
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 用户注册
     *
     * @param vo ...
     */
    void regist(MemberRegistVo vo);

    void checkPhoneUnique(String Phone) throws PhoneExistException;

    void checkUsernameUnique(String username) throws UsernameExistException;

    /**
     * 用户登录
     *
     * @param vo ...
     * @return ...
     */
    MemberEntity login(MemberLoginVo vo);

    /**
     * 社交登录功能
     *
     * @param socialUser ...
     * @return ...
     * @throws Exception ...
     */
    MemberEntity login(SocialUser socialUser) throws Exception;
}

